import { cloneDeep } from 'lodash-es'
import { BwAntComNameEnum } from '../../../render/enums'

import { aColOptions } from './src/col'
import { aRowOptions } from './src/row'
import { aFormOptions } from './src/form'
import { aFormItemOptions } from './src/formItem'
import { aAutoCompleteOptions } from './src/autoComplete'
import { aCheckboxOptions } from './src/checkbox'
import { aCheckboxGroupOptions } from './src/checkboxGroup'
import { aDatePickerOptions } from './src/datePicker'
import { aRangePickerOptions } from './src/rangePicker'
import { aTimeptions } from './src/time'
import { aInputOptions } from './src/input'
import { aInputSearchOptions } from './src/inputSearch'
import { aNumberOptions } from './src/number'
import { aRadioGroupOptions } from './src/radioGroup'
import { aRadioOptions } from './src/radio'
import { aRateOptions } from './src/rate'
import { aSelectOptions } from './src/select'
import { aSwitchOptions } from './src/switch'
import { aTextareaOptions } from './src/textarea'
import { aTreeSelectOptions } from './src/treeSelect'
import { aModalOptions } from './src/modal'
import { aTreeOptions } from './src/tree'
import { aTagOptions } from './src/tag'
import { aButtonOptions } from './src/button'
import { aPaginationOptions } from './src/pagination'
import { aCascaderOptions } from './src/cascader'
import { aTooltipOptions } from './src/tooltip'
import { aTabsOptions } from './src/tabs'
import { aTabPaneOptions } from './src/tabPane'
import { aMenuOptions } from './src/menu'
import { aImageOptions } from './src/image'

import type { BwDesignNodeComDefaultOptionModel } from '../../model'
import { aUploadOptions } from './src/upload'
import { aPopoverOptions } from './src/popover'

/** 获取组件默认配置信息 */
export function getAntComDefaultConfig(comCode: BwAntComNameEnum) {
  const data: BwDesignNodeComDefaultOptionModel = {
    attrs: null,
    enableSlotList: null,
  }
  switch (comCode) {
    case BwAntComNameEnum.AForm: {
      data.attrs = cloneDeep(aFormOptions.attrs)
      data.enableSlotList = cloneDeep(aFormOptions.slotList)
      break
    }
    case BwAntComNameEnum.AFormItem: {
      data.attrs = cloneDeep(aFormItemOptions.attrs)
      data.enableSlotList = cloneDeep(aFormItemOptions.slotList)
      break
    }
    case BwAntComNameEnum.ACol: {
      data.attrs = cloneDeep(aColOptions.attrs)
      data.enableSlotList = cloneDeep(aColOptions.slotList)
      break
    }
    case BwAntComNameEnum.ARow: {
      data.attrs = cloneDeep(aRowOptions.attrs)
      data.enableSlotList = cloneDeep(aRowOptions.slotList)
      break
    }

    case BwAntComNameEnum.AAutoComplete: {
      data.attrs = cloneDeep(aAutoCompleteOptions.attrs)
      data.enableSlotList = cloneDeep(aAutoCompleteOptions.slotList)
      break
    }
    case BwAntComNameEnum.ACheckbox: {
      data.attrs = cloneDeep(aCheckboxOptions.attrs)
      data.enableSlotList = cloneDeep(aCheckboxOptions.slotList)
      break
    }
    case BwAntComNameEnum.ACheckboxGroup: {
      data.attrs = cloneDeep(aCheckboxGroupOptions.attrs)
      data.enableSlotList = cloneDeep(aCheckboxGroupOptions.slotList)
      break
    }
    case BwAntComNameEnum.ADatePicker: {
      data.attrs = cloneDeep(aDatePickerOptions.attrs)
      data.enableSlotList = cloneDeep(aDatePickerOptions.slotList)
      break
    }
    case BwAntComNameEnum.AInput: {
      data.attrs = cloneDeep(aInputOptions.attrs)
      data.enableSlotList = cloneDeep(aInputOptions.slotList)
      break
    }
    case BwAntComNameEnum.AInputSearch: {
      data.attrs = cloneDeep(aInputSearchOptions.attrs)
      data.enableSlotList = cloneDeep(aInputSearchOptions.slotList)
      break
    }
    case BwAntComNameEnum.AInputNumber: {
      data.attrs = cloneDeep(aNumberOptions.attrs)
      data.enableSlotList = cloneDeep(aNumberOptions.slotList)
      break
    }
    case BwAntComNameEnum.ARadioGroup: {
      data.attrs = cloneDeep(aRadioGroupOptions.attrs)
      data.enableSlotList = cloneDeep(aRadioGroupOptions.slotList)
      break
    }
    case BwAntComNameEnum.ARadio: {
      data.attrs = cloneDeep(aRadioOptions.attrs)
      data.enableSlotList = cloneDeep(aRadioOptions.slotList)
      break
    }
    case BwAntComNameEnum.ARangePicker: {
      data.attrs = cloneDeep(aRangePickerOptions.attrs)
      data.enableSlotList = cloneDeep(aRangePickerOptions.slotList)
      break
    }
    case BwAntComNameEnum.ATimePicker: {
      data.attrs = cloneDeep(aTimeptions.attrs)
      data.enableSlotList = cloneDeep(aTimeptions.slotList)
      break
    }
    case BwAntComNameEnum.ARate: {
      data.attrs = cloneDeep(aRateOptions.attrs)
      data.enableSlotList = cloneDeep(aRateOptions.slotList)
      break
    }
    case BwAntComNameEnum.ASelect: {
      data.attrs = cloneDeep(aSelectOptions.attrs)
      data.enableSlotList = cloneDeep(aSelectOptions.slotList)
      break
    }
    case BwAntComNameEnum.ASwitch: {
      data.attrs = cloneDeep(aSwitchOptions.attrs)
      data.enableSlotList = cloneDeep(aSwitchOptions.slotList)
      break
    }
    case BwAntComNameEnum.ATextarea: {
      data.attrs = cloneDeep(aTextareaOptions.attrs)
      data.enableSlotList = cloneDeep(aTextareaOptions.slotList)
      break
    }
    case BwAntComNameEnum.ATreeSelect: {
      data.attrs = cloneDeep(aTreeSelectOptions.attrs)
      data.enableSlotList = cloneDeep(aTreeSelectOptions.slotList)
      break
    }
    case BwAntComNameEnum.AModal: {
      data.attrs = cloneDeep(aModalOptions.attrs)
      data.enableSlotList = cloneDeep(aModalOptions.slotList)
      break
    }
    case BwAntComNameEnum.ATree: {
      data.attrs = cloneDeep(aTreeOptions.attrs)
      data.enableSlotList = cloneDeep(aTreeOptions.slotList)
      break
    }
    case BwAntComNameEnum.ATag: {
      data.attrs = cloneDeep(aTagOptions.attrs)
      data.enableSlotList = cloneDeep(aTagOptions.slotList)
      break
    }
    case BwAntComNameEnum.AButton: {
      data.attrs = cloneDeep(aButtonOptions.attrs)
      data.enableSlotList = cloneDeep(aButtonOptions.slotList)
      break
    }
    case BwAntComNameEnum.APagination: {
      data.attrs = cloneDeep(aPaginationOptions.attrs)
      data.enableSlotList = cloneDeep(aPaginationOptions.slotList)
      break
    }
    case BwAntComNameEnum.ATooltip: {
      data.attrs = cloneDeep(aTooltipOptions.attrs)
      data.enableSlotList = cloneDeep(aTooltipOptions.slotList)
      break
    }
    case BwAntComNameEnum.ACascader: {
      data.attrs = cloneDeep(aCascaderOptions.attrs)
      data.enableSlotList = cloneDeep(aCascaderOptions.slotList)
      break
    }
    case BwAntComNameEnum.ATabs: {
      data.attrs = cloneDeep(aTabsOptions.attrs)
      data.enableSlotList = cloneDeep(aTabsOptions.slotList)
      break
    }
    case BwAntComNameEnum.ATabPane: {
      data.attrs = cloneDeep(aTabPaneOptions.attrs)
      data.enableSlotList = cloneDeep(aTabPaneOptions.slotList)
      break
    }
    case BwAntComNameEnum.AMenu: {
      data.attrs = cloneDeep(aMenuOptions.attrs)
      data.enableSlotList = cloneDeep(aMenuOptions.slotList)
      break
    }
    case BwAntComNameEnum.AImage: {
      data.attrs = cloneDeep(aImageOptions.attrs)
      data.enableSlotList = cloneDeep(aImageOptions.slotList)
      break
    }
    case BwAntComNameEnum.AUpload: {
      data.attrs = cloneDeep(aUploadOptions.attrs)
      data.enableSlotList = cloneDeep(aUploadOptions.slotList)
      break
    }
    case BwAntComNameEnum.APopover: {
      data.attrs = cloneDeep(aPopoverOptions.attrs)
      data.enableSlotList = cloneDeep(aPopoverOptions.slotList)
      break
    }
  }
  return data
}
